#ifndef MY_GRAPHICAL_SUSBSYSTEM_INCLUDED
#define MY_GRAPHICAL_SUSBSYSTEM_INCLUDED
#include "triangles.h"
#include <QtGui/QGraphicsScene>
#include <QWidget>

#define mCBLACK 0xFFFFFFFF
#define mCBLUE 0xFFFF0000
#define mCGREEN 0xFF00FF00
#define mCGRAY 0xFF404040
#define mSSOLID 0
#define mSDASH 1



class SimpleDrawer
{
private:
    int width;
    int height;
    QGraphicsScene* img;
    QPen pen;
    QPainterPath* openeds;
    long fcol;
    int fsiz;
    void SetPColor(long c);
    void SetPStyle(int s);
    void SetPWidth(int w);
    void SetFColor(long c);
    void SetFSize(int h);
    void MoveTo(int x,int y);
    void LineTo(int x,int y);


    private:
        SimpleDrawer();
        void DrawTriangle(const Triangle& tri);
        void DrawLine(const Line& lin);
        void DrawCoord(const Coord& coo);
    public:
        SimpleDrawer(QGraphicsScene* _img);
        ~SimpleDrawer();
        void Draw();
};
#endif
